<template>
  <div>
    父组件的值:{{_provided.obj.show}}
    <button @click="_provided.obj.show = 2">change 2</button>
    <my-inject></my-inject>
    <my-inject2></my-inject2>
  </div>
</template>
<script>
import Vue from 'vue'
import MyInject from './MyInject'
import MyInject2 from './MyInject2'
export default {
  provide: {
    obj: new Vue({
      data() {
        return { show: 1 }
      }
    })
  },
  components: {
    MyInject,
    MyInject2
  }
}
</script>
